<template>
  <div class="hzq-error" v-show="store.getError(name)">
    {{ store.getError(name) }}
  </div>
</template>

<script setup lang="ts">
// 模块引入
import { useErrorStore } from '@/store/error'
defineOptions({
  // 组件名称
  name: 'ErrorComp',
  // 继承透传，是否继承没在子组件声明的父组件的属性
  inheritAttrs: true
})
const { name } = defineProps<{ name: string }>()
const store = useErrorStore()
</script>

<style scoped lang="scss"></style>
